//
//  cinemaCell.m
//  HuiWenMovie
//
//  Created by niceDay on 15/7/22.
//  Copyright (c) 2015年 computer. All rights reserved.
//

#import "cinemaCell.h"

@implementation cinemaCell

- (void)awakeFromNib {
    
}

- (void)setModal:(CinemaModal *)modal{
    _modal = modal;
    [self setNeedsLayout];
}

- (void)layoutSubviews{
    self.backgroundColor = [UIColor blackColor];
    _nameLable.text = _modal.name;
    _nameLable.textColor = [UIColor whiteColor];
    _nameLable.font = [UIFont systemFontOfSize:20.0];
    
    _addressLable.text = _modal.address;
    _addressLable.textColor = [UIColor grayColor];
    
    _gradeLable.text = _modal.grade;
    _gradeLable.textColor = [UIColor whiteColor];
    
    _lowPriceLable.text = [NSString  stringWithFormat:@"¥ %.2f" ,[_modal.lowPrice floatValue]];
    _lowPriceLable.textColor = [UIColor whiteColor];
    
    if ([_modal.isCouponSupport isEqualToString: @"1"]) {
        _isCouponSupportImageView.image = [UIImage imageNamed:@"juan.jpg"];
    }
    else{
        _isCouponSupportImageView.image = nil;
    }
    
    if ([_modal.isSeatSupport isEqualToString:@"1"]) {
        _isSeatSupportImageView.image = [UIImage imageNamed:@"zuo.jpg"];
    }
    else{
        _isSeatSupportImageView.image = nil;
    }
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
